setsumbit=function(){
	let button=document.getElementById("addsubimt");
	let id=document.getElementById('emid');
	getjgiid();
	id.innerText=getjgid();
	button.onclick=function(){
		myclick();
	}
}
myclick=function(){
	let xml;
	let id=document.getElementById('emid').innerText;
	let lv=document.getElementById('jg').value;
	let name=document.getElementById('name').value;
	let pid=document.getElementById('parent').value;
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
			let t=JSON.parse(xml.responseText);
			if(t.status==200)
			alert("成功");
			else alert("失败");
		}
	}
	xml.open("post","/institution/update",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('iName='+name+'&iLevel='+lv+'&iParent='+pid+'&iID='+id);
}
getjgiid=function(){
	let xml;
	let id=getjgid();
	let lv=document.getElementById('jg');
	let name=document.getElementById('name');
	let pid=document.getElementById('parent');
	if (window.XMLHttpRequest)
	{
	    //  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
	    xml=new XMLHttpRequest();
	}
	else
	{
	    // IE6, IE5 浏览器执行代码
	    xml=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xml.onreadystatechange=function(){
		if(xml.readyState==4&&xml.status==200){
			let t=JSON.parse(xml.responseText)
			lv.value=t.data.iLevel;
			name.value=t.data.iName;
			pid.value=t.data.iParent;
		}
	}
	xml.open("post","/institution/findByIid",true);
	xml.setRequestHeader('content-type','application/x-www-form-urlencoded');
	xml.send('iID='+id);
}
let getjgid=function(){
	let id=decodeURI(window.location .href);
    let aa=id.indexOf('=');
    if (aa>-1){
    id=id.substring(aa+1);
    }
    return id;
}